import { defineStore } from "pinia";
import { ref, computed } from "vue";

const storeSetup = () => {
  /* 定义数据--------------------------------------------------------------------- */
  // 连接池
  const connectPool = ref([]);

  /* 定义函数--------------------------------------------------------------------- */
  // 获取连接池
  const getConnectPool = () => {};

  // 新建连接
  const addConnect = (connect) => {};

  // 编辑连接
  const editConnect = (connect) => {};

  // 删除连接
  const deleteConnect = (connect) => {};

  // 返回参数
  return {
    connectPool,
    getConnectPool,
    addConnect,
    editConnect,
    deleteConnect,
  };
};

// 导出Store
export const useConnectStore = defineStore("connect", storeSetup, {
  persist: true,
});
